<html>
  <head>
    <title>Dojo: Hello World!</title>

    <style type="text/css">
        @import "/assets/js/dojo-release-1.1.0/dijit/themes/tundra/tundra.css";
        @import "/assets/js/dojo-release-1.1.0/dojo/resources/dojo.css"
    </style>
    
    <script type="text/javascript" src="/assets/js/dojo-release-1.1.0/dojo/dojo.js"
      djConfig="parseOnLoad: true"></script>
    
    <script type="text/javascript">
       // Load Dojo's code relating to the Button widget
       dojo.require("dijit.form.Button");
       dojo.require("dijit.Editor");
       dojo.require("dojo.parser");
    </script>
    
    <script>
       function helloCallback(data,ioArgs) {
          alert(data);
       }       
       function helloError(data, ioArgs) {
          alert('Error when retrieving data from the server!');
       }
    </script>
    
  </head>

  <body class="tundra">
    
    <button dojoType="dijit.form.Button" id="helloButton">
        Hello World!
        <script type="dojo/method" event="onClick">
           dojo.xhrPost({
                url: 'dojoTest.php',
                load: helloCallback,
                error: helloError,
                form: 'myForm'
           });
        </script>
    </button>
    
    
    
    <form id="myForm" method="POST">
        <textarea name="myText" dojoType="dijit.Editor" 
        styleSheets="/assets/js/dojo-release-1.1.0/dojo/resources/dojo.css"/>
        <input type="hidden" name="richText" />
    </form>
    
  </body>
</html>